package com.igoal.comparator;

import java.util.Comparator;

import com.igoal.entity.CommentEntryDone;

public class CommentEntryDoneComparator extends BaseComparator implements
		Comparator<CommentEntryDone> {
	
	public CommentEntryDoneComparator(boolean isASC) {
		this.isASC = isASC;
	}
	
	public int compare(CommentEntryDone o1, CommentEntryDone o2) {
		if(o1 != null & o2 != null){
			if(isASC)
				return o1.getUpdateDate().compareTo(o2.getUpdateDate());
			else
				return o2.getUpdateDate().compareTo(o1.getUpdateDate());
		}
		return 0;
	}
}
